import { ref } from 'vue'
import PageContent from '@/components/page-content'

export function usePageSearch() {
  const pageContentRef = ref<InstanceType<typeof PageContent>>()

  const resetBtnClick = () => {
    pageContentRef.value?.searchTableClick()
  }

  const searchBtnClick = (queryData: any) => {
    pageContentRef.value?.searchTableClick(queryData)
  }

  return [pageContentRef, resetBtnClick, searchBtnClick]
}